Skip to content

ci: run iOS device tests on arm64#4961

Draft
jpnurmi wants to merge 5 commits intomainfrom
ci/ios-devtest-arm64
Draft

ci: run iOS device tests on arm64#4961
jpnurmi wants to merge 5 commits intomainfrom
ci/ios-devtest-arm64

Conversation

@jpnurmi
Copy link
Collaborator

@jpnurmi jpnurmi commented Feb 27, 2026

System.Reflection.Emit is blocked on ARM64 simulators due to W^X. The Mono interpreter (<UseInterpreter>true</UseInterpreter>) already handles this, so switching from x64/Rosetta to iossimulator-arm64 works with the current build settings.

#skip-changelog

System.Reflection.Emit is blocked on arm64 simulators due to W^X — this is
what NSubstitute/Castle.DynamicProxy needs:
https://learn.microsoft.com/en-us/dotnet/maui/macios/interpreter

The Mono interpreter bypasses this by interpreting emitted IL instead of
generating native code. Sentry.Maui.Device.TestApp.csproj already has
<UseInterpreter>true</UseInterpreter> for Release, and the build already
passes EnableAot=false. So the two workarounds are redundant — either x64
via Rosetta OR the interpreter alone should suffice. Switching to
iossimulator-arm64 should work with the current build settings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.89%. Comparing base (1753b23) to head (a55c177).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4961      +/-   ##
==========================================
+ Coverage   73.87%   73.89%   +0.01%     
==========================================
  Files         496      496              
  Lines       17951    17951              
  Branches     3516     3516              
==========================================
+ Hits        13262    13265       +3     
+ Misses       3831     3825       -6     
- Partials      858      861       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpnurmi jpnurmi force-pushed the ci/ios-devtest-arm64 branch 2 times, most recently from 8bf3565 to 2b92506 Compare February 27, 2026 12:32
jpnurmi and others added 2 commits February 27, 2026 14:27
mlaunch (inside xharness) checks if simulator watchdogs are disabled
before launching an app. If they aren't, it shuts down the simulator,
writes plist files, then reboots — this sequence is flaky on CI, often
leaving the simulator stuck in a Shutdown state with:
  "Unable to lookup in current state: Shutdown"

Root cause was found by decompiling mlaunch with ilspycmd (it ships as
a compiled DLL in the xharness NuGet). It checks two plists under the
simulator's data directory:
  ~/Library/Developer/CoreSimulator/Devices/$UDID/data/Library/Preferences/
    - com.apple.springboard.plist
    - com.apple.frontboard.plist

All 6 FBLaunchWatchdog* keys must be >= 100, otherwise mlaunch shuts
down the sim to write them and reboots — which races on CI.

Fix: pre-write both plists with the 6 keys set to 100 before booting
the simulator ourselves. mlaunch then sees watchdogs already disabled
and the sim already booted, skipping its entire shutdown/reboot dance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jpnurmi jpnurmi force-pushed the ci/ios-devtest-arm64 branch from 2b92506 to d10ed15 Compare February 27, 2026 13:28
@jpnurmi jpnurmi changed the title WIP: ci: run iOS device tests on arm64 ci: run iOS device tests on arm64 Feb 27, 2026
@jpnurmi jpnurmi force-pushed the ci/ios-devtest-arm64 branch 2 times, most recently from a44a1e3 to d10ed15 Compare February 28, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant